package com.vframework.mq.impl;

import com.vframework.mq.MqService;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class RabbitMqService implements MqService {

    @Resource
    RabbitTemplate rabbitTemplate;

    @Override
    public void send(String queueName, Object message) {
        rabbitTemplate.convertAndSend(queueName, message);
    }
}
